home *** CD-ROM | disk | FTP | other *** search
- # otherwise ReadOnly memory write access protection fault occures on NT
- iritstate( "InterpProd", off );
- include("surfcore");
-
- PlanarSurf = FUNCTION():
- return = sbezier( list(
- list( ctlpt( E3, 0.0, 0.0, 0 ),
- ctlpt( E3, 0.0, 0.5, 0 ),
- ctlpt( E3, 0.0, 1.0, 0 ) ),
-
- list( ctlpt( E3, 0.5, 0.0, 0 ),
- ctlpt( E3, 0.5, 0.5, 0 ),
- ctlpt( E3, 0.5, 1.0, 0 ) ),
-
- list( ctlpt( E3, 1.0, 0.0, 0 ),
- ctlpt( E3, 1.0, 0.5, 0 ),
- ctlpt( E3, 1.0, 1.0, 0 ) ) ) );
-
- DemoSimpleSurf = FUNCTION():
- return = sbezier( list(
- list( ctlpt( E3, 0.3, 0.0, -0.3 ),
- ctlpt( E3, 0.0, 0.2, -0.0 ),
- ctlpt( E3, 0.0, 0.8, -0.0 ),
- ctlpt( E3, 0.3, 1.0, -0.3 ) ),
-
- list( ctlpt( E3, 0.5, -0.3, 0.0 ),
- ctlpt( E3, 0.5, 0.6, 0.6 ),
- ctlpt( E3, 0.5, 0.4, 0.6 ),
- ctlpt( E3, 0.5, 1.3, 0.0 ) ),
-
- list( ctlpt( E3, 1.0, -0.3, 0.0 ),
- ctlpt( E3, 1.0, 0.4, 0.6 ),
- ctlpt( E3, 1.0, 0.6, 0.6 ),
- ctlpt( E3, 1.0, 1.3, 0.0 ) ),
-
- list( ctlpt( E3, 1.5, 0.0, -0.3 ),
- ctlpt( E3, 1.8, 0.2, -0.0 ),
- ctlpt( E3, 1.8, 0.8, -0.0 ),
- ctlpt( E3, 1.5, 1.0, -0.3 ) ) ) );
-
- DemoSurf = FUNCTION():
- return = sbezier( list(
- list( ctlpt( E3, 0.0, 0.0, 0.0),
- ctlpt( E3, -0.2, 0.2, 0.4 ),
- ctlpt( E3, -0.2, 0.8, 0.4 ),
- ctlpt( E3, 0.0, 1.0, 0.0) ),
-
- list( ctlpt( E3, 0.5, -0.2, 0.5 ),
- ctlpt( E3, 0.5, 0.2, 0.9),
- ctlpt( E3, 0.5, 0.8, 0.9),
- ctlpt( E3, 0.5, 1.2, 0.5 ) ),
-
- list( ctlpt( E3, 1.0, -0.2, -0.5 ),
- ctlpt( E3, 1.0, 0.2, -0.1 ),
- ctlpt( E3, 1.0, 0.8, -0.1 ),
- ctlpt( E3, 1.0, 1.2, -0.5 ) ),
-
- list( ctlpt( E3, 1.5, 0.0, 0.0),
- ctlpt( E3, 1.7, 0.2, 0.4 ),
- ctlpt( E3, 1.7, 0.8, 0.4 ),
- ctlpt( E3, 1.5, 1.0, 0.0) ) ) );
-
- DemoCurve = FUNCTION():
- return = pcircle( vector( 0.5, 0.5, 0.0 ), 0.4 );
-
- RunSurfDomainDemo = PROCEDURE(): scene:
- ShowCurvGeom(false, false):
- ShowSurfGeom(true, false):
- ShowSurfHodo(false, false):
- showSurfDomain = true:
- scene = SurfAndHodoScene():
- printf("Demonstration of domain curve image in surface\\n", nil()):
- view(scene, true): pause();
-
- RepeatMovie = PROCEDURE(numOfSamples): step: scene: t:
- scene = SurfAndHodoScene():
- step = 1 / numOfSamples:
- for (t=0, step, 1,
- view(GeomAtParam(t) + GeomAtCurvParam(t) + scene, true)
- );
-
- RunMovie = PROCEDURE(surfDeriv, surfCrvtr, curvDeriv, curvCrvtr): scene:
- showSurfDomain = false:
- ShowSurfGeom(surfDeriv, surfCrvtr):
- ShowCurvGeom(curvDeriv, curvCrvtr):
- scene = SurfAndHodoScene():
- view(scene, true):
- printf("*** Make sure that you are ready to run movie ***\\n", nil()):
- pause():
- RepeatMovie(40);
-
- RunHodographDemo = PROCEDURE(): scene:
- printf("Surface hodographs demo (MOVIE)\\n", nil()):
- ShowSurfHodo(true, true):
- RunMovie(true, false, false, false);
-
- RunSurfGeomDemo = PROCEDURE():
- printf("Surface geometry: derivatives and curvatures demo (MOVIE)\\n", nil()):
- ShowSurfHodo(false, false):
- RunMovie(true, true, false, false);
-
- RunCurvGeomDemo = PROCEDURE():
- printf("Curve in surface geometry: derivatives and curvatures demo (MOVIE)\\n", nil()):
- ShowSurfHodo(false, false):
- RunMovie(false, false, true, true);
-
- RunCurvAndSurfDemo = PROCEDURE():
- printf("Curve in surface geometry with surface derivatives (MOVIE)\\n", nil()):
- ShowSurfHodo(false, false):
- RunMovie(true, false, true, true);
-
- RunSurfAndCurvDemo = PROCEDURE():
- printf("Surface geometry with curve derivatives (MOVIE)\\n", nil()):
- ShowSurfHodo(false, false):
- RunMovie(true, true, true, false);
-
- CreateSurfDemo(DemoSurf(), DemoCurve());
- RunSurfDomainDemo();
- RunHodographDemo();
- RunSurfGeomDemo();
- view(GeomAtParam(0.013640) + SurfAndHodoScene(), true); # k2 inflection
- RepeatMovie(50);
- RunCurvAndSurfDemo();
-